package com.ruoyi.web.controller.tool;

import com.ruoyi.common.domain.excel.EmployeeExcelVo;
import com.ruoyi.common.utils.EmployeeFileExportUtil;
import com.ruoyi.common.utils.poi.ExcelUtil;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletResponse;

@RestController
@RequestMapping("/dataExport")
public class DataExportController {

    @PostMapping
    public void dataExport(HttpServletResponse response) {
        EmployeeExcelVo excelVo = new EmployeeExcelVo();
        excelVo.setUsername("杨宸");
        excelVo.setFirstAvatarMergedRow(2);
        excelVo.setFirstAvatarMergedColumn(3);
        excelVo.setLastAvatarMergedRow(4);
        excelVo.setLastAvatarMergedColumn(10);
        EmployeeFileExportUtil.export(response, excelVo);
    }


}
